import {defineStore} from 'pinia';
import {MenuTheme} from "ant-design-vue/es/menu/src/interface";

const state = {
    ID: 'layoutStore',
    title: 'Abl Admin Pro',
    //1左右布局（inline）；2上下布局（horizontal）；
    type: 1,
    //1 inline | 2 horizontal | vertical
    menuMode: "inline" as any,
    menuSelectedKey: [],
    menuOpenKey: [],
    //系统设置（true=打开）
    openDrawer: true,
    //搜索框（true=打开）
    openSearch: false,
    //展示历史标签
    showTabView: true,
    //'dark|light'
    theme: "dark" as MenuTheme,
    //左侧菜单状态（true=打开）
    siderCollapsed: false,
    //当前TabView(刷新后只保留首页+当前页)
    tabView: [],
    //页面加载Loading
    pageLoading: false,
    pageLoadingText: '加载中...',
    //全屏加载Loading
    windowLoading: false,
    windowLoadingText: '加载中...',
    footerText: 'Ant Design ©2022 ABL Admin Pro',
}


export const useLayoutStore = defineStore(state.ID, {
    state: () => {
        return state
    },
})
